package com.binfenhulian.chinaenergy.ces.manage.service.crawler;

import com.binfenhulian.chinaenergy.ces.core.exception.BaseException;
import com.binfenhulian.chinaenergy.ces.manage.bean.param.CrawlerParam;
import com.binfenhulian.chinaenergy.ces.manage.bean.param.PageParam;
import com.github.pagehelper.PageInfo;

import java.util.Map;

/**
 * Created by wanghjbuf on 2018/3/14.
 */
public interface CrawlerService {

    /**
     * 查询爬虫配置
     * @param paramMap
     * @return
     */
    public PageInfo listCrawlerByPage(Map<String,Object> paramMap) throws BaseException;

    /**
     * 保存配置
     * @param crawlerParam
     * @return
     * @throws BaseException
     */
    public int save(CrawlerParam crawlerParam) throws BaseException;

    /**
     * 开启爬虫服务
     * @param id
     * @return
     * @throws BaseException
     */
    public int start(long id) throws BaseException;

    /**
     * 停用爬虫服务
     * @param id
     * @return
     * @throws BaseException
     */
    public int stop(long id) throws BaseException;
}
